package com.example.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.HistoryRank;
import com.example.entity.News;
import com.example.qo.HistoryRankQuery;
import com.example.service.IHistoryRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yunan
 * @since 2023-04-14
 */
@RestController
@CrossOrigin
public class HistoryRankController {

    @Autowired
    private IHistoryRankService historyRankService;

    @RequestMapping("/rank")
    public List<News> rank(){
        return historyRankService.queryPage();
    }

    @RequestMapping("/chijiu")
    public boolean cj(){
        return historyRankService.cj();
    }
}
